Skip to content

miner: account for generateWork elapsed time in payload rebuild timer#33908

Merged
fjl merged 1 commit into
ethereum:masterfrom
vickkkkkyy:account
Mar 2, 2026
Merged

miner: account for generateWork elapsed time in payload rebuild timer#33908
fjl merged 1 commit into
ethereum:masterfrom
vickkkkkyy:account

Conversation

@vickkkkkyy
Copy link
Copy Markdown
Contributor

@vickkkkkyy vickkkkkyy commented Feb 28, 2026

The payload rebuild loop resets the timer with the full Recommit duration after generateWork returns, making the actual interval generateWork_elapsed + Recommit instead of Recommit alone.

Since fillTransactions uses Recommit (2s) as its timeout ceiling, the effective rebuild interval can reach ~4s under heavy blob workloads — only 1–2 rebuilds in a 6s half-slot window instead of the intended 3.

Fix by subtracting elapsed time from the timer reset.

Before this fix

t=0s  timer fires, generateWork starts
t=2s  fillTransactions times out, timer.Reset(2s)
t=4s  second rebuild starts
t=6s  CL calls getPayload — gets the t=2s result (1 effective rebuild)

After

t=0s  timer fires, generateWork starts
t=2s  fillTransactions times out, timer.Reset(2s - 2s = 0)
t=2s  second rebuild starts immediately
t=4s  timer.Reset(0), third rebuild starts
t=6s  CL calls getPayload — gets the t=4s result (3 effective rebuilds)

@rjl493456442 rjl493456442 added this to the 1.17.1 milestone Mar 2, 2026
@fjl fjl merged commit b25080c into ethereum:master Mar 2, 2026
16 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants